;(function(win) {
	var NetworkEngine = function() {
		return new NetworkEngine.init();
	}
	
	var networkEngineProps = NetworkEngine.prototype;
	NetworkEngine.init = function() {};
	NetworkEngine.init.prototype = networkEngineProps;
	NetworkEngine.version ={};
	NetworkEngine.version.number = "1.0.0.RELEASE";
	NetworkEngine.version.author = "yumi@omuao.com";
	networkEngineProps.setWorldOptions = function(options) {
		this.worldOptions = options;
	}
	
	win.NetworkEngine = NetworkEngine;
	
	//初始化网络引擎
	if(win.JadeEngine != null && typeof win.JadeEngine !== "undefined" ){
		JadeEngine.World.prototype.setNetworkEngine = function(networkEngine){
			if(!networkEngine instanceof NetworkEngine){
				throw "NetworkEngine is not set";
			}
			networkEngine.setWordOptions(this);
			this.networkEngine = networkEngine;
			return this.networkEngine;
		}
		JadeEngine.World.prototype.getNetworkEngine = function(){
			if(this.networkEngine == null || typeof this.networkEngine === "undefined") {
				this.networkEngine = new NetworkEngine();
				this.networkEngine.setWorldOptions(this);
			}
			return this.networkEngine;
		}
		JadeEngine.World.prototype.getNetworkEngineVersionInfo = function(){
			return NetworkEngine.version;
		}
	}
}(window));